<!-- 个人中心：支持装修 -->
<script setup lang="ts">
  import { computed, reactive, ref } from 'vue';
  import { onShow, onPageScroll, onPullDownRefresh } from '@dcloudio/uni-app';
  import sheep from '@/sheep';
  import { useGlobalTemplate } from '@/simba/hooks/global';
  const { page, navigationBar } = useGlobalTemplate()
  // 隐藏原生tabBar
  // uni.hideTabBar({
  //   fail: () => {},
  // });
  // const showTabbar = ref(true)
	const showBgImage = reactive({
		bgMain: false,
		bgBody: false
	})
	
 //  const template = computed(() => sheep.$store('app').template.user);
	// console.log(template.value.page, template.value.navigationBar)
  onShow(() => {
    sheep.$store('user').updateUserData();
  });

  onPullDownRefresh(() => {
    sheep.$store('user').updateUserData();
    setTimeout(function () {
      uni.stopPullDownRefresh();
    }, 800);
  });

  onPageScroll(() => {});
</script>

<template>
  <s-layout
    title="我的"
    tabbar="/pages/index/user"
    navbar="custom"
	:showTabbar="false"
	:showBgImage="showBgImage"
    :bgStyle="page"
    :navbarStyle="navigationBar"
  >
  <s-user-card></s-user-card>
  <!-- <view @tap="sheep.$router.go('/pages/public/setting', {title: '系统设置'})"> 设置</view> -->
  <siNavigator text="共同养护人" iconName="plus-people-fill" navUrl="/pages/user/conserves/ConservePersonList"/>
  <siNavigator text="位置品种管理" iconName="plus-people-fill" navUrl="/pages/plant/locBreed/LocBreedList"/>
  <siNavigator text="用户协议" iconName="plus-people-fill" richTitle="用户协议"/>
  <siNavigator text="关于我们" iconName="plus-people-fill" richTitle="关于我们"/>
  <siNavigator text="常见问题" iconName="plus-people-fill" richTitle="常见问题"/>
  <siNavigator text="系统设置" navUrl="/pages/public/setting" />
    <!-- <s-block
      v-for="(item, index) in template.components"
      :key="index"
      :styles="item.property.style"
    >
      <s-block-item :type="item.id" :data="item.property" :styles="item.property.style" />
    </s-block> -->
  </s-layout>
</template>

<style></style>
